<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<script type="text/javascript" src="jq/jquery-3.7.1.js"></script>
<body>
<form action="updateShopServlet" method="get" id="forms">
			id<input type="text" name="shopId" id="shopId" value="${param.shopId }" readonly><br>
		          商品名<input type="text" name="shopName" id="shopName" value="${param.shopName }"><br>
		          商品地址<input type="text" name="shopUrl" id="shopUrl" value="${param.shopUrl }"><br>
		          商品价格<input type="text" name="shopPrice" id="shopPrice" value="${param.shopPrice }"><br>
		          商品状态<input type="text" name="shopType" id="shopType" value="${param.shopType }"><br>
		     <input type="button" value="确认修改" id="shopUpdate">
</form>
</body>
<script type="text/javascript">
$("#shopUpdate").click(function(){
	if($("input[name=shopName]").val()==""){
		alert("商品名未填写！！！");
	}
	else if($("input[name=shopUrl]").val()==""){
		alert("商品地址未填写！！！");
	}
	else if($("input[name=shopPrice]").val()==""){
		alert("商品价格未填写！！！");
	}
	else if($("input[name=shopType]").val()==""){
		alert("商品类型未填写！！！");
	}
	else{
		$("#forms").submit();
	}
	
});

</script>
</html>